<script lang="ts">
import {analyzeDataReq, getFileData} from '@/api/systemTools'
import DeletePracticeRecords from "@/views/systemTools/systemSalarySettlement/step/step3/deletePracticeRecords.vue";
import ExperienceClassTransaction from "@/views/systemTools/systemSalarySettlement/step/step3/experienceClassTransaction.vue";
import ExperienceClassNotTransaction from "@/views/systemTools/systemSalarySettlement/step/step3/experienceClassNotTransaction.vue";
import NanExperienceClassData from "@/views/systemTools/systemSalarySettlement/step/step3/nonExperienceClassData/nonExperienceClassData.vue";
import Dirct from "@/views/systemTools/systemSalarySettlement/step/step3/nonExperienceClassData/dirct.vue";
import CoachAnalysis from "@/views/systemTools/systemSalarySettlement/step/step3/CoachAnalysis.vue";

export default {
  name: "step3",
  components: {
    CoachAnalysis,
    Dirct,
    DeletePracticeRecords,
    ExperienceClassTransaction,
    ExperienceClassNotTransaction,
    NanExperienceClassData
  },
  props: {
    redisKey: {
      type: String,
      default: ''
    }
  },
  created() {
    this.analyzeData()
  },
  data() {
    return {
      activeName: 'first',
      mapData: {}

    };
  },
  methods: {
    handleClick(tab, event) {
    },
    analyzeData() {
      analyzeDataReq({redisKey: this.redisKey}).then(res => {
        this.mapData = res
      })
    }

  }
}
</script>

<template>
  <div>
    <div>
      <el-button type="primary" @click="$emit('prev')">上一步</el-button>
      <el-button type="primary" @click="$emit('next', redisKey)">下一步</el-button>
    </div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="删除状态异常数据" name="first">
        <delete-practice-records :table-data="mapData.deletePracticeRecords"></delete-practice-records>
      </el-tab-pane>
      <el-tab-pane label="体验课成交数据" name="third">
        <experience-class-transaction :table-data="mapData.experienceClassTransaction"></experience-class-transaction>
      </el-tab-pane>
      <el-tab-pane label="体验课未成交数据" name="fourth">
        <experience-class-not-transaction :table-data="mapData.experienceClassNotTransaction"
        ></experience-class-not-transaction>
      </el-tab-pane>
      <el-tab-pane label="正式课数据分析" name="five">
        <dirct :map-data="mapData"></dirct>
      </el-tab-pane>
      <el-tab-pane label="教练分析" name="second">
        <CoachAnalysis :coach-list="mapData.coachList" :map-data="mapData"></CoachAnalysis>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>


<style scoped lang="scss">

</style>
